﻿using HCMS.IRepositories;
using Volo.Abp.Domain.Entities;
using Volo.Abp.EntityFrameworkCore;

namespace HCMS.Repositories.OAuth2
{
    /// <summary>
    /// OAuth 2.0 仓储基础
    /// </summary>
    /// <remarks>
    /// 自定义主键类型
    /// </remarks>
    public class OAuth2BaseRepository<TEntity, TPrimaryKey> : CommonRepository<OAuth2DbContext, TEntity, TPrimaryKey>, ICommonRepository<TEntity, TPrimaryKey>
        where TEntity : class,
        IEntity<TPrimaryKey>
    {
        protected OAuth2BaseRepository(IDbContextProvider<OAuth2DbContext> dbContextProvider)
            : base(dbContextProvider)
        {

        }
    }

    /// <summary>
    /// OAuth 2.0 仓储基础
    /// </summary>
    /// <remarks>
    /// int 类型主键
    /// </remarks>
    public class OAuth2BaseRepository<TEntity> : OAuth2BaseRepository<TEntity, int>
        where TEntity : class,
        IEntity<int>
    {
        protected OAuth2BaseRepository(IDbContextProvider<OAuth2DbContext> dbContextProvider)
            : base(dbContextProvider)
        {

        }
    }
}
